<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>bbs club</title>
    <link rel="stylesheet" href="/static/css/bootstrap.min.css">
    <link rel="stylesheet" href="/static/css/style.css">
    <link rel="stylesheet" href="/static/lib/editor/editor.css">
    <link rel="stylesheet" href="/static/lib/webuploader/webuploader.css">
    <script src="/static/lib/jquery-3.0.0.min.js"></script>
    <script src="/static/lib/markdownit.js"></script>
    <script src="/static/lib/webuploader/webuploader.withoutimage.js"></script>
    <script src="/static/lib/editor/editor.js"></script>
    <script src="/static/lib/editor/ext.js"></script>
</head>
<body>
    <div id="main">
        <div id="content">
            <div class="panel">
                <div class="inner post">
<form id="create_topic_form" method="post" action="{{ url_for('.add', token=token) }}">
<!--<form id="create_topic_form" method="post" action="{{ url_for('.add') }}">-->
    <fieldset>
        <textarea autofocus class='span9' id='title'
                  name='title' rows='1'
                  placeholder="标题字数 10 字以上"></textarea>
        <span class="tab-selector">选择版块：</span>
        <select name="board_id" id="board" required>
            {% for b in bs %}
                {% if bid == b.id %}
                    <option value="{{ b.id }}" selected >{{ b.title }}</option>
                {% else %}
                    <option value="{{ b.id }}" >{{ b.title }}</option>
                {% endif %}
            {% endfor %}
        </select>
        <div class='markdown_editor in_editor'>
          <div class='markdown_in_editor'>
            <textarea class='editor' name='content' rows='20' placeholder='文章支持 Markdown 语法, 请注意标记代码'></textarea>
            <div class='editor_buttons'>
              <input type="submit" class='span-primary submit_btn' data-loading-text="提交中" value="提交">
            </div>
          </div>
        </div>
    </fieldset>
</form>
                </div>
            </div>
        </div>
    </div>
<script>
  (function () {
    var editor = new Editor();
    editor.render($('.editor')[0]);
  })();
</script>
</body>
</html>